<%
var containerParam = {
	title: '从者管理',
	currentMenu: 'servantMgr',
	jsArray: [ctxPath + '/js/servant/form.js'],
	breadcrumbMap: {
		'首页': ctxPath + '/',
		'从者管理': ctxPath + '/servant/list',
		'添加/编辑': null
	}
};
layout('/common/_website_container.html', containerParam){
%>
<div class="layui-card">
	<div class="layui-card-body padding-15">
		<form class="layui-form" lay-filter="form">
			<#formhidden name="id"/>
			<#forminput label="编号" name="gameId"/>
			<#forminput label="名称" name="name"/>
			<#forminput label="日文名称" name="jName"/>
			<#forminput label="英文名称" name="eName"/>
			<#forminput label="昵称" name="nickname"/>
			<#formselect label="星级" name="star" value="${entity.star!}" itemValue="value" itemDesc="value" items="${@CollectionUtils.generateSeries(0,1,2,3,4,5)}"/>
			<#formselect label="cost" name="cost" value="${entity.cost!}" itemValue="value" itemDesc="value" items="${@CollectionUtils.generateSeries(0,3,4,7,12,16)}"/>
			<#formselect label="职介" name="classId" value="${entity.classId!}" itemValue="id" itemDesc="name" items="${classes}"/>
			<#formselect label="阵营" name="faction" value="${entity.faction.value!}" itemValue="value" itemDesc="desc" items="${@ServantFaction.values()}"/>
			<#formselects label="获取方式" name="get" value="${@StringUtils.splitToInteger(entity.get!, ',')}" itemValue="value" itemDesc="desc" items="${@ServantGet.values()}"/>
			<#forminput label="初始hp" name="initialHp" verify="number"/>
			<#forminput label="初始atk" name="initialAtk" verify="number"/>
			<#forminput label="满级hp" name="fullLevelHp" verify="number"/>
			<#forminput label="满级atk" name="fullLevelAtk" verify="number"/>
			<#forminput label="百级hp" name="hundredHp" verify="number"/>
			<#forminput label="百级atk" name="hundredAtk" verify="number"/>
			<#formimage label="头像" id="avatar" name="avatar"/>
			<#formselect label="宝具色卡" name="npColorCard" value="${entity.npColorCard.value!}" itemValue="value" itemDesc="desc" items="${@ColorCard.values()}"/>
			<#formselect label="宝具类型" name="npType" value="${entity.npType.value!}" itemValue="value" itemDesc="desc" items="${@ServantNpType.values()}"/>
			<#formselect label="色卡" name="cards" value="${entity.cards.value!}" itemValue="value" itemDesc="desc" items="${@ServantCards.values()}"/>
			<#formselect label="性别" name="sex" value="${entity.sex.value!}" itemValue="value" itemDesc="desc" items="${@Sex.values()}"/>
			<#formselect label="属性A" name="propA" value="${entity.propA.value!}" itemValue="value" itemDesc="desc" items="${@ServantPropA.values()}"/>
			<#formselect label="属性B" name="propB" value="${entity.propB.value!}" itemValue="value" itemDesc="desc" items="${@ServantPropB.values()}"/>
			<#formselects label="特性" name="traits" value="${traits}" itemValue="value" itemDesc="desc" items="${@ServantTrait.values()}"/>
			<#formdynamic label="声优" name="cv" data="${servantCvs}"/>
			<#formselect label="画师" name="painterId" value="${entity.painterId!}" itemValue="id" itemDesc="name" items="${painters}"/>
			<#forminput label="身高" name="height"/>
			<#forminput label="体重" name="weight"/>
			<#formselect label="筋力" name="strength" value="${entity.strength.value!}" itemValue="value" itemDesc="desc" items="${@PanelLevel.values()}"/>
			<#formselect label="耐久" name="endurance" value="${entity.endurance.value!}" itemValue="value" itemDesc="desc" items="${@PanelLevel.values()}"/>
			<#formselect label="敏捷" name="agility" value="${entity.agility.value!}" itemValue="value" itemDesc="desc" items="${@PanelLevel.values()}"/>
			<#formselect label="魔力" name="mana" value="${entity.mana.value!}" itemValue="value" itemDesc="desc" items="${@PanelLevel.values()}"/>
			<#formselect label="幸运" name="luck" value="${entity.luck.value!}" itemValue="value" itemDesc="desc" items="${@PanelLevel.values()}"/>
			<#formselect label="宝具" name="npLevel" value="${entity.npLevel.value!}" itemValue="value" itemDesc="desc" items="${@PanelLevel.values()}"/>
			<#forminput label="Q卡np率" name="npQuick"/>
			<#forminput label="A卡np率" name="npArts"/>
			<#forminput label="B卡np率" name="npBuster"/>
			<#forminput label="Ex卡np率" name="npExtra"/>
			<#forminput label="宝具卡np率" name="npNp"/>
			<#forminput label="受击np" name="npSuffer"/>
			<#forminput label="Q卡hit" name="hitQuick" verify="number"/>
			<#forminput label="A卡hit" name="hitArts" verify="number"/>
			<#forminput label="B卡hit" name="hitBuster" verify="number"/>
			<#forminput label="Ex卡hit" name="hitExtra" verify="number"/>
			<#forminput label="宝具卡hit" name="hitNp" verify="number"/>
			<#forminput label="出星率" name="starRate"/>
			<#forminput label="即死补正" name="beKilled"/>
			<#forminput label="集星权重" name="collectingStars" verify="number"/>
			<#forminput label="1绊" name="bond1" value="${servantBondMap[1].value!}" verify="number"/>
			<#forminput label="2绊" name="bond2" value="${servantBondMap[2].value!}" verify="number"/>
			<#forminput label="3绊" name="bond3" value="${servantBondMap[3].value!}" verify="number"/>
			<#forminput label="4绊" name="bond4" value="${servantBondMap[4].value!}" verify="number"/>
			<#forminput label="5绊" name="bond5" value="${servantBondMap[5].value!}" verify="number"/>
			<#forminput label="6绊" name="bond6" value="${servantBondMap[6].value!}" verify="number"/>
			<#forminput label="7绊" name="bond7" value="${servantBondMap[7].value!}" verify="number"/>
			<#forminput label="8绊" name="bond8" value="${servantBondMap[8].value!}" verify="number"/>
			<#forminput label="9绊" name="bond9" value="${servantBondMap[9].value!}" verify="number"/>
			<#forminput label="10绊" name="bond10" value="${servantBondMap[10].value!}" verify="number"/>
			<#forminput label="11绊" name="bond11" value="${servantBondMap[11].value!}" verify="number"/>
			<#forminput label="12绊" name="bond12" value="${servantBondMap[12].value!}" verify="number"/>
			<#forminput label="13绊" name="bond13" value="${servantBondMap[13].value!}" verify="number"/>
			<#forminput label="14绊" name="bond14" value="${servantBondMap[14].value!}" verify="number"/>
			<#forminput label="15绊" name="bond15" value="${servantBondMap[15].value!}" verify="number"/>
			<#formsubmit/>
		</form>
	</div>
</div>

<script id="cvTpl" type="text/html">
	<div class="layui-row">
		<input type="hidden" name="servantCvId" value="{{=d.id}}">
		<div class="layui-input-inline">
			<select name="cvId" lay-verify="required" lay-search>
				<option value=""></option>
				<% for (cv in cvs) { %>
				<option value="${cv.id}" {{# if (d.cvId === ${cv.id}) { }}selected{{# } }}>${cv.name}</option>
				<% } %>
			</select>
		</div>
		<div class="layui-input-inline">
			<input type="text" class="layui-input" name="remark" placeholder="备注" value="{{=d.remark}}">
		</div>
		<a href="javascript:void(0)" class="layui-icon layui-icon-close delete-btn"></a>
	</div>
</script>
<% } %>
